#!/bin/sh
a=$(lsof -i :7000 | grep -v grep |grep -v PID | awk '{print $2}')
if [ $a ];then

kill $a && nohup go run index.go &  
echo '\r\n'
echo '\033[31m 【重启成功!】 \033[0m'
echo '\r\n'
	else
echo '\r\n'
echo '\033[31m 【go程序未启动！】\033[0m'
echo '\r\n'
fi
